package com.ks.service;

import com.ks.base.BaseService;
import com.ks.dao.ProfessionDao;
import com.ks.entity.Profession;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service("professionService")
public class ProfessionService<T> extends BaseService<T> {
    private final static Logger log = Logger.getLogger(ProfessionService.class);

    @Autowired
    private ProfessionDao<T> dao;

    public ProfessionDao<T> getDao() {
        return dao;
    }

    public List<Profession> findByTypeId(String typeId){
        Map<String,Object> map = new HashMap<>();
        map.put("typeId",typeId);
        return dao.findByTypeId(map);
    }

}
